package ywpt.web.common;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import org.omg.CORBA.portable.ApplicationException;

public class InitPath {
	
	public static String getUploadPath(String Param)  throws NamingException,ApplicationException 
	  { 
	      String resultPath = null; 
	      try 
	      { 
	          Context initCtx = new InitialContext(); 
	          Context envCtx = (Context)initCtx.lookup("java:comp/env"); 
	          resultPath = (String)envCtx.lookup(Param); 
	      } 
	      catch(NamingException e) 
	      { 
	    	  throw new ApplicationException("InitPath.getLogPath Exception:" + e.getMessage() + ":\n", null); 
	      } 
	      return resultPath; 
	    } 

}
